home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 779 < prev    next >
Encoding:
Text File  |  1996-08-05  |  1.4 KB  |  41 lines

  1. Newsgroups: comp.lang.c
  2. Path: mxsld2.pd.infn.it!LORETI
  3. From: loreti@mxsld2.pd.infn.it (Maurizio Loreti)
  4. Subject: Re: REQ: Circle function?
  5. X-Nntp-Posting-Host: mxsld2.pd.infn.it
  6. Message-ID: <DKwKos.4yK@news.cern.ch>
  7. Sender: news@news.cern.ch (USENET News System)
  8. Reply-To: loreti@mxsld2.pd.infn.it
  9. Organization: I.N.F.N. Padova - CDF/CMS VAXcluster
  10. References: <4cl6hb$him@news.doit.wisc.edu>,<4cri9r$1qo@pyrrhus-f.hrz.tu-chemnitz.de>
  11. Date: Tue, 9 Jan 1996 07:26:28 GMT
  12.  
  13. In article <4cri9r$1qo@pyrrhus-f.hrz.tu-chemnitz.de>, hfst@hrz.tu-chemnitz.de (Hans Steffani) writes:
  14. >nicks@njackn.com (Nick A. Scheibel) writes:
  15. >
  16. >>I'm writing a small graphics lib in C for use in my programs and I
  17. >>can't figure out how to draw a circle. Can anyone point me to some
  18. >>source that will accomplish this rather small task for me?
  19. >>    -Nick Scheibel
  20. >
  21. >Start with
  22. > x = x0 + r sin t
  23. > y = y0 + r cos t
  24. >with
  25. >0 <= t < 2 Pi
  26. >
  27. >to compute the koordinates of the points of the circle.
  28. >
  29. >h.f.s.
  30. >--
  31. >Hans Friedrich Steffani
  32. >Institut fuer Elektrische Maschinen und Antriebe
  33. >TU Chemnitz-Zwickau
  34. >e-mail: hans.steffani@e-technik.tu-chemnitz.de
  35.  
  36. Better, look for something called "Bresenham algorithm" in a textbook
  37. in your library (since you are posting from an academic site).
  38. --
  39. Maurizio Loreti                       http://mvxpd5.pd.infn.it/wwwcdf/mlo.html
  40. Un. of Padova, Dept. of Physics - Padova, Italy          loreti@padova.infn.it
  41.